import request from "@/utils/request";


// 分页
export function deptPage(data) {
  return request({
    url: '/depts/page',
    method: 'post',
    data
  })
}


// 添加/修改
export function dept_insert_edit(data) {
  return request({
    url: '/depts/insert/edit',
    method: 'post',
    data
  })
}

// 获取部门信息
export function dept_one(id) {
  return request({
    url: '/depts/one/' + id,
    method: 'get',
  })
}

// 删除/批量删除
export function deptBatchDelete(data) {
  return request({
    url: '/depts/batch/remove',
    method: "post",
    data
  })
}

// 获取所有部门列表
export function deptList() {
  return request({
    url: '/depts/list',
    method: "get",
  })
}
